package com.market.dao.jpa;

import org.springframework.stereotype.Repository;

import com.market.dao.FaqDao;
import com.market.domain.Faq;

@Repository("faqDao")
public class FaqDaoJpa extends GenericDaoJpa<Faq, Long> implements FaqDao {
	public FaqDaoJpa() {
		super(Faq.class);
	}

	public void remove(Faq faq) {
		if (this.findById(faq.getId()) == null) {
			log.debug(this.getClass() + " Faq with id " + faq.getId()
					+ " not found, can not be deleted");
		} else {
			log.debug(this.getClass() + " Faq with id " + faq.getId()
					+ " found, will be deleted");
			super.removeById(faq.getId());
		}
	}

}
